using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

public class StartMenu : MonoBehaviour
{
    public SOSettings settings;
    public InputField inputFeild;
    public Toggle toggle;

    private void Start()
    {
        inputFeild.onSubmit.AddListener(SetPortName);
        toggle.onValueChanged.AddListener(SetUsingController);
    }

    public void SetUsingController(bool b)
    {
        settings.isUsingController = b;
    }

    public void SetPortName(string str)
    {
        settings.portname = str;
    }

    public void StartGame()
    {
        SceneManager.LoadScene(1);
    }
}